package com.walker.taskscheduling.listener;

import com.banggood.sp.dispatcher.bean.ExecuteResult;
import com.banggood.sp.dispatcher.core.ITaskInfoListener;
import com.walker.taskscheduling.bo.TaskDataBO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author RR
 * @date 2024/2/19 23:39
 */
@Component("firstTaskSourceListener")
@Slf4j
public class FirstTaskSourceListener extends ITaskInfoListener<TaskDataBO> {

    @Override
    public ExecuteResult execute(TaskDataBO s) {
        log.info("消费消息：{}", s);
        return new ExecuteResult();
    }

    @Override
    public ExecuteResult batchExecute(List<TaskDataBO> list) {
        return null;
    }
}
